package com.bzkj.basicinfo.mapper.allocation;

import com.bzkj.basicinfo.domain.allocation.WmsStockAllocationEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * WMS库存分配 Mapper接口
 *
 * @author system
 * @date 2025-10-22
 */
public interface WmsStockAllocationMapper {

    /**
     * 查询库存分配列表
     */
    List<WmsStockAllocationEntity> selectAllocationList(WmsStockAllocationEntity entity);

    /**
     * 查询库存分配详情
     */
    WmsStockAllocationEntity selectAllocationById(@Param("id") Long id);

    /**
     * 根据出库单ID查询分配记录
     */
    WmsStockAllocationEntity selectAllocationByOutboundId(@Param("outboundOrderId") Long outboundOrderId);

    /**
     * 新增库存分配
     */
    int insertAllocation(WmsStockAllocationEntity entity);

    /**
     * 更新库存分配
     */
    int updateAllocation(WmsStockAllocationEntity entity);

    /**
     * 删除库存分配
     */
    int deleteAllocationById(@Param("id") Long id);
}
